home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / answers / comp / 386bsd-faq / part5 < prev    next >
Internet Message Format  |  1994-04-01  |  18KB

  1. Path: bloom-beacon.mit.edu!hookup!europa.eng.gtefsd.com!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!ctc.com!news.mic.ucla.edu!ux1.lmu.edu!cynjut.ogisd.ess.harris.com!jocas-al.brooks.af.mil!hrd769.brooks.af.mil!not-for-mail
  2. From: burgess@hrd769.brooks.af.mil (Dave Burgess)
  3. Newsgroups: comp.os.386bsd.announce,comp.answers,news.answers
  4. Subject: [comp.os.386bsd] BNR/2 derived BSD for PCs FAQ (Part 5 of 10)
  5. Followup-To: comp.os.386bsd.misc
  6. Date: 31 Mar 1994 21:37:41 -0000
  7. Organization: Armstrong Laboratory, Brooks AFB, TX
  8. Lines: 438
  9. Approved: news-answers-request@MIT.Edu
  10. Distribution: world
  11. Expires: 04/18/94
  12. Message-ID: <386bsd-faq-5-765149856@hrd769.brooks.af.mil>
  13. References: <386bsd-faq-1-765149856@hrd769.brooks.af.mil>
  14. Reply-To: 386bsd-faq@hrd769.brooks.af.mil (386bsd FAQ Maintainer)
  15. NNTP-Posting-Host: hrd769.brooks.af.mil
  16. Xref: bloom-beacon.mit.edu comp.os.386bsd.announce:310 comp.answers:4390 news.answers:17179
  17.  
  18. Posted-By: auto-faq 2.4
  19. Archive-name: 386bsd-faq/part5
  20.  
  21. Section 4.    (Kernel Additions)
  22.  
  23.   Thanks go to  Marc Wandschneider (storm@cs.mcgill.ca) for putting this
  24.   section of the FAQ together..
  25.  
  26. 4.0    Introduction
  27.  
  28.     If you have written some addition to the kernel, or know of
  29.     one that feel should be mentioned, send mail to Dave Burgess 
  30.     (burgess@hrd769.brooks.af.mil) with all the relevant information, 
  31.     and it will be added for the next release.
  32.  
  33.  
  34.  
  35. 4.1    Common Kernel-related problems
  36.  
  37. 4.1.1    Where are the commands "rpcinfo" and "rpcgen"?
  38.  
  39.     Chris Flatters (cflatter@nrao.edu) informs us in the following
  40.     posting excerpt where we can find them:
  41.  
  42.     --------------------------------------------------------------------
  43.     The sources for the Sun OS 4.0 RPC are on titan.rice.edu (I don't 
  44.     have the inet number handy) in directory sun-sources.  You will have 
  45.     to pick up all the shell archives and unpack them to get at rpcgen.
  46.     --------------------------------------------------------------------
  47.  
  48.     These sources are also included in NetBSD and FreeBSD as part of the
  49.     normal installation.
  50.  
  51. 4.1.2    Where can I get a working "netstat"?
  52.  
  53.     netstat was released as a binary patch and source patch 
  54.     in the patchkit.  Netstat will be a part of the FreeBSD 
  55.     distribution currently under construction, and is already
  56.     part of NetBSD.
  57.  
  58.  
  59. 4.1.3    How can I fix NFS to work with my NE2000 board?
  60.  
  61.     Ken Raeburn (raeburn@cambridge.cygnus.com) has both identified the
  62.     problem and provided us with a work around:
  63.  
  64.     --------------------------------------------------------------------
  65.     I reported previously that I was seeing problems reading files over
  66.     NFS using the ne2000 driver; timeouts would eventually be reported, no
  67.     data would be read.  Listing files and directories (small ones
  68.     anyways) were not a problem.
  69.  
  70.     After playing with etherfind and kernel printfs, I've come to this
  71.     conclusion: Fragmented 8K UDP packets from the NFS server are not
  72.     reaching the UDP layer in 386bsd.  The Sun is sending them (according
  73.     to another Sun spying on the network), but the UDP input routine is
  74.     never called.  I don't know if the bug here is on the 386bsd or Sun
  75.     side, and won't have time to look into it in the next couple of days.
  76.  
  77.     In the meantime, mounting NFS file systems with "rsize=1024" does get
  78.     rid of this problem.
  79.  
  80.     (It does nothing about TCP being slow, though.)
  81.     Ken
  82.     --------------------------------------------------------------------
  83.  
  84.     Hopefully, the real solution (a UDP fix) will be forthcoming so
  85.     that the slow TCP problem is fixed as well.
  86.  
  87.     See also:  Section 2.6.3.3c "I am getting lousy performance 
  88.            out of my network card.  What are some of the other 
  89.            possibilities?"
  90.  
  91.     Recent work in FreeBSD and NetBSD may have deprecated this problem.
  92.     There is a new network card driver called the ed0 driver.  This
  93.     replaces the original NE1000/NE2000 drivers, as well as replacing
  94.     the we0 driver.  By combining the two, a more flexible driver has
  95.     been developed and most of these types of problems have been fixed.
  96.     Once again, upgrading to FreeBSD or NetBSD seems to be the answer.
  97.  
  98.  
  99. 4.1.4    How can I get "ps" and "w" to work?
  100.  
  101.     The patch-kit contains a fix for /src/lib/libutil/kvm.c, which,
  102.     last we heard, was due to the work of Jim Paradis 
  103.     (paradis@sousa.ltn.dec.com).  New versions of the kernel should
  104.     have this problem fixed.
  105.  
  106.     In order for users to be able to use certain flags with ps and
  107.     the w/uptime commands, the kernel must have permissions 755.
  108.  
  109.     Also, in order to save space on the distribution, the kernel is 
  110.     'stripped' of all its labels.  Programs that rely on those labels
  111.     will not work.  There are several in this category, including ps, 
  112.     w, and uptime.  Either ftp an un-stripped kernel, or recompile.
  113.  
  114.  
  115. 4.1.5    Where are re_comp and re_exec?
  116.  
  117.     These two functions are currently not in libc.a.  However, there
  118.     are two related functions that seem to work exactly the same in
  119.     all cases we've heard of---These are regcomp() and regexec().
  120.  
  121.     Thus, a pretty ugly fix for the problem would be to always compile
  122.     as follows:
  123.  
  124.     $(CC) -Dre_comp=regcomp -Dre_exec=regexec ....
  125.  
  126.     There is a slightly nicer fix available for this, listed in 4.2
  127.  
  128.  
  129. 4.1.6    Where are stty() and gtty()?
  130.  
  131.     These functions are missing from libc.a.  To fix, add the following
  132.     #defines to your program:
  133.  
  134.     #define stty(f, m)    ioctl((f), TIOCSETP, (m))
  135.     #define gtty(f, m)    ioctl((f), TIOCGETP, (m))
  136.  
  137.     A more elegant solution is to apply the patchkit.  These routines
  138.     are included in there.
  139.  
  140. 4.1.7    The system hangs with the HD light on after intense disk usage.
  141.     The system hangs when trying to fsck -p both of my IDE hard drives
  142.     at boot-up.
  143.  
  144.     Brett Lymn (blymn@mulga.awadi.com.AU)  Provides us with a
  145.     description of the problem and the steps that he had to take
  146.     to fix it:
  147.  
  148.         It seems that, on some disk subsystems, the controller and the
  149.     hard disk get out of synchronization when they are being used 
  150.     intensively.  The result of this is that the disk completes a 
  151.     command but the controller still believes the disk not to have 
  152.     completed the command, so the controller status register 
  153.     indicates the disk is busy when it is not really.  The standard 
  154.     wd drivers are too trusting of the hardware and expect it to do 
  155.     the right thing all the time.  There are a few while loops in 
  156.     the wd drivers that loop on a status change from the disk 
  157.     controller, however; if the problem I have described takes place 
  158.     then the wd driver will be stuck looping waiting for the disk to 
  159.     not be busy - which never happens, so you lock the machine because 
  160.     this is a kernel level wait.  To fix this problem I put a timeout 
  161.     into the while loops so that after a specified time the wd driver 
  162.     will give up waiting for the drive to become ready, reset the 
  163.     controller and retry the command.  In my experience the retry 
  164.     always succeeds.
  165.  
  166.     Ed.Note:  The retry doesn't ALWAYS work, but it IS better than 
  167.     just waiting for the drive to wake back up (which it never does).
  168.  
  169.     Dan Yergeau (yergeau@gloworm.Stanford.EDU) provides us with more 
  170.     insight into this problem.  The README accompanying the original 
  171.     sources used as a base for the NetBSD driver indicates that
  172.  
  173.     > There's also another problem still bothering me: There's some 
  174.     sort of timing/reentrancy error still lurking in here, that was 
  175.     there in the original 0.1 wd driver as well.  The symptom is that, 
  176.     on *some* controllers, doing the initial wdopen() (which will 
  177.     then call the readdisklabel() function) for two or more disks at 
  178.     the same time (so that wdopen() gets called again while it's 
  179.     already being executed), the controller gets hung.  I'm still 
  180.     looking for this, meanwhile I specify in my config file that I 
  181.     have swap on all disks.  This causes the kernel to wdopen() the 
  182.     drives nicely in order -- and once it's been done for each disk, 
  183.     the problem will, of course, not occur.  Without the "swap on ... 
  184.     and ... and ..." stuff, my wd1, wd2 and wd3 would be opened 
  185.     simultaneously by "fsck -p" forks, which would nicely hang up 
  186.     everything...  I note a "sleep(10)" in fsck, but it obviously 
  187.     doesn't do that.
  188.  
  189.     So, changing the appropriate config line to
  190.  
  191.     config        "386bsd"    root on wd0 swap on wd0 and wd1
  192.                                                             ^^^^^^^
  193.     may get around the problem.  I don't run NetBSD, but I do use a
  194.     variation of the barsoom/NetBSD driver.  This works for me.  
  195.     Please let the NetBSD people know if it works for you.
  196.  
  197.     (Note: the sleep(10) in fsck is misplaced.  It does not keep fsck 
  198.     from opening multiple disks simultaneously.  A properly placed 
  199.     sleep() should also work around the wdopen problem.)
  200.  
  201. #include <std.disclaimer>
  202.  
  203.     [Ed. again] Other methods for fixing this problem include doing a 
  204.     dd if=/dev/wd1d of=/dev/null count=1 before the initial 'fsck -p'.
  205.     This method is considered brute force.  It works by making sure
  206.     that the drive is properly initialized before the disklabel is
  207.     read in the fsck.
  208.  
  209.     Another method involves using the '-l1' (little L) flag to make sure
  210.     that the fsck doesn't try to open both unopened hard drives at the
  211.     same time.  This method is a little better (from a purely brute
  212.     viewpoint) but does caused your startup to run longer, since the
  213.     purpose of this option is to have each of your fsck passes run
  214.     one after another.
  215.  
  216.  
  217. 4.1.8    How do you implement quotas on Net/2 derived BSD systems?
  218.  
  219.     From: tinguely@plains.NoDak.edu (Mark Tinguely)
  220.  
  221.      maybe you did not complete the setup, here is a step-by-step 
  222.      instructions to get them to work:
  223.  
  224.     1)  make a kernel with "options quota" installed
  225.  
  226.     2)  edit /etc/fstab and include the kinds of quotas you want, 
  227.         below I used "userquota", you could also add "groupquota".
  228.  
  229.     /dev/wd0h        /usr        ufs    rw,userquota 1 2
  230.  
  231.     3)  for each filesystem that is in /etc/fstab that uses quota,
  232.         create the file "quota.user" (and "quota.group if appropriate).
  233.         Above I have user quotas in the /usr filesystem, so I would:
  234.  
  235.         # touch /usr/quota.user
  236.  
  237.     4)  scan filesystem for files ownership (and/or group ownership).
  238.  
  239.         # quotacheck -a
  240.  
  241.     5)  now you can add individual quota limits, if you want to add 
  242.         the same quotas to the many people, then make a template and 
  243.         replicate the template.  If they change for each user, then 
  244.         edit seperately.
  245.  
  246.         # edquota tinguely
  247.  
  248.      (an editor is kicked up and says something like:
  249.  
  250.     Quotas for user tinguely:
  251.       /usr: blocks in use: 11876, limits (soft = 0, hard = 0)
  252.             inodes in use: 891, limits (soft = 0, hard = 0)
  253.  
  254.      a limit of 0 means "unlimited".  Change these to the appropriate 
  255.      number of blocks.  A soft limit generates a warning, and can be 
  256.      exceed for period of time (7 days?), after which time a soft limit 
  257.      is treated like a hard limit.  A hard limit denies new writes.
  258.  
  259.      to replicate a template (for this example let us assume "tinguely" 
  260.      is the template):
  261.  
  262.         # edquota -p tinguely user1 user2 user3 ... userN
  263.  
  264.     6)  turn quotas on (usually done in the /etc/rc file, but turn it 
  265.         on manually so you do not have to reboot right now:
  266.  
  267.         # quotaon
  268.  
  269.     that should take care of setting up quotas.  You can look at the 
  270.     status of use of files with repquota, the -a option lists all 
  271.     filesystems with quotas.
  272.  
  273.  
  274. 4.2    Available kernel add-ons
  275.  
  276.  
  277. 4.2.1    The Patch-Kit
  278.  
  279.     Perhaps the most famous of all additions to the kernel, the Patch-Kit,
  280.     currently coordinated by Rodney Grimes (rgrimes@agora.rain.com)
  281.     contains numerous bug fixes, Julian's SCSI drivers, as well as fixes
  282.     for other parts of the system.
  283.  
  284.     The patch-kit, as well as all relevant information, is available on
  285.     agate.berkeley.edu (and mirrors) in unofficial/patch-kit, as well
  286.     as bsd.co.montana.edu in /pub/patch-kit. (archie will likely list
  287.     other sites as well)
  288.  
  289.     It is highly recommended that all users with space for the source code
  290.     apply the patch-kits as many things that seem broken in 0.1 suddenly
  291.     start working with the patch-kits.
  292.  
  293. 4.2.2    Shared Libraries
  294.  
  295.     A basic and experimental implementation of shared libraries exists
  296.     for 386bsd.  According to the author (Dr. Joerg Lohse, 
  297.     lohse@tech7.informatik.uni-hamburg.de), features are as follows:
  298.  
  299.     -No kernel extension is necessary
  300.     -Shared libraries use the approach used in SysV.
  301.  
  302.     Others are also working on different implementations of shared
  303.     libraries.
  304.  
  305.     Bill and Lynne have adopted a shared-library implementation based
  306.     on Dr. Lohse's original work.  It will be included in Version 0.2
  307.     of 386bsd.
  308.  
  309.     For NetBSD and FreeBSD users, Paul Kranenberg has created a 
  310.     seperate and different shared library system based on the style
  311.     of the 'Sun' shared library system.  The feature is included in
  312.     the '-current' tree of both systems, and may be included in the
  313.     next major release of eiter or both.
  314.  
  315.  
  316. 4.2.3    Sound Blaster Drivers
  317.  
  318.     A driver for the Sound Blaster card has been written by Steve
  319.     Haehnichen (steveh@ucsd.edu) for BSD.  Steve Gerakines has
  320.     provided us with the information necessary to get this driver 
  321.     working under 386bsd.
  322.  
  323.     Most features of the SB family of cards are supported save some
  324.     stereo portions of the SBPro cards.
  325.  
  326.     The driver is available on agate.berkeley.edu in 
  327.     unofficial/drivers/misc/soundblaster-1.4
  328.  
  329.     NetBSD and FreeBSD have also adapted soundblaster drivers.  They
  330.     are included in either the -current tree or in the most recent 
  331.     release (depending on when you read this).
  332.  
  333.     For a fact, the following sound cards are supported in FreeBSD:
  334.  
  335.         1    Yamaha FM Synth
  336.         2    Soundblaster/Soundblaster Pro DSP
  337.         3    PAS PCM and Midi
  338.         4    Gravis UltraSound
  339.         5    MPU-401
  340.  
  341.     In the release notes I have, there is some doubt as to the 
  342.     operational status of the MPU-401 sound card driver.  If you have 
  343.     one of these cards and want to try the driver out, you should 
  344.     contact Jordan Hubbard (jkh@freefall.cdrom.com) when you are 
  345.     finished installing it and let him know how it is working.
  346.  
  347.     The docs for the driver is in /usr/src/sys/i386/doc/sound.doc.
  348.     
  349.  
  350. 4.2.4    Bus Mouse Drivers
  351.  
  352.     Fred Cawthorne (fcawth@delphi.umd.edu) wrote a busmouse
  353.     driver for 386bsd.  He recently wrote a short letter with this
  354.     update:
  355.  
  356.     My busmouse driver is mentioned in the FAQ, but it is quite out of 
  357.     date.  I use Gene Stark's driver available from Freebsd.cdrom.com 
  358.     in /pub/XFree86/mice.  (It is well done and I did not have time to 
  359.     finish mine to make it more stable)  It is small, though, so it 
  360.     might be good for people who want to rewrite parts, etc...  
  361.     Several people have written about getting this to work with new
  362.     versions, etc... and I have pointed them to the other driver.  It 
  363.     would seem that people found out about my busmouse driver through 
  364.     the FAQ, so could you please add something like the following to 
  365.     the FAQ??
  366.  
  367.     This is taken from the INDEX in the Freebsd.cdrom.com mice 
  368.     directory:
  369.  
  370.     "We currently have four bus mouse drivers for 386bsd available by
  371.     anonymous ftp on XFree-86.cdrom.com in pub/XFree86/mice:
  372.  
  373.     ms-busmouse.tar.z
  374.  
  375.         Sandi Donno's <sandi@uctcs.cs.uct.ac.za.> port of 
  376.         Erik Forsberg's Microsoft bus mouse driver to 386bsd.
  377.  
  378.     logitech-busmouse-0.2.shar.z
  379.  
  380.         Fred Cawthorne's <fcawth@delphi.umd.edu> second version 
  381.         of a logitech Bus Mouse driver.  
  382.  
  383.     busmouse.tar.z:
  384.  
  385.         Eugene Stark's port of Rick Macklem's driver to the 
  386.         Microsoft bus mouse.  Rick's driver supports the 
  387.         Logitech and ATI Inport Bus mice with 386bsd.  It's also 
  388.         available by e-mail to stark@cs.sunysb.edu and by anon. 
  389.         ftp on cs.sunysb.edu in pub/386BSD/busmouse.tar.Z.
  390.  
  391.     psm.tar.z:
  392.  
  393.         Johan Solhed <Johan.Solhed@lu.erisoft.se> ported the 
  394.         Linux PS/2 mouse driver to 386BSD.  It includes a PS/2 
  395.         to Microsoft protocol converter in the driver so XFree86 
  396.         understands the mouse events.
  397.  
  398.     In addition we have busmouse.v3.z which is Erik Forsberg's original
  399.     post of his device driver for BSDI/386 and Microsoft (and
  400.     compatible) bus mice using the Microsoft InPort chip as well as a
  401.     device driver for Logitech bus mice. "
  402.  
  403.     I prefer busmouse.tar.z, and that seems to be the one that 
  404.     supports the most mice.  It also drops into FreeBSD very easily.
  405.     (all you have to do is copy com.c into /sys/i386/isa and add the
  406.      device mse0 ... line to the system config file.)
  407.  
  408.  
  409. 4.2.5    PPP Support
  410.  
  411.     A package to add PPP support to 386bsd can be found on agate
  412.     in unofficial/drivers/net.  PPP support is included in NetBSD 
  413.     and FreeBSD.
  414.  
  415.  
  416. 4.2.6    re_comp and re_exec library functions
  417.  
  418.     As mentioned in section 4.1, re_comp and related functions, such
  419.     as re_exec, are currently not in the library libc.a.  Apart from
  420.     using the rather crude fix listed above, there is another option.
  421.  
  422.     Kim Anderson (kim@dde.dk) has provided a patch that will add these
  423.     to libc.a.  You can probably obtain this patch from the author, or
  424.     you can ftp it from binkley.cs.mcgill.ca in pub/386bsd.
  425.  
  426.  
  427. 4.2.7    Intel i82586 Ethernet Controller driver
  428.  
  429.     Garrett A. Wollman has written a driver for the Intel i83586 
  430.     Ethernet Controller.  The driver is available from agate
  431.     in unofficial/from-ref/sys.extras.
  432.  
  433.     The authors e-mail address is listed as Garrett.Wollman@uvm.edu,
  434.     attempts to send him mail there have failed.
  435.  
  436.  
  437. 4.2.8    PC Speaker driver for Nethack
  438.  
  439.     Andrew A. Chernov has ported the Nethack PC Speaker driver to
  440.     386bsd.  It allows the speaker to be controlled by applications.
  441.  
  442.     Unfortunately, we are not aware of a site that distributes this,
  443.     but this patch has been posted a couple of times to the various
  444.     comp.os.386bsd groups, and the author can be contacted at
  445.     ache@astral.msk.su
  446.  
  447.     The patch that is included in the NetBSD and FreeBSD source trees
  448.     is one written by Soerne Schmitt.  It appears to use the Sun-style
  449.     /dev/audio interface and is different in goals and implementation
  450.     from Andrew Chernov's speaker driver.  The source for this package
  451.     is included in the source trees for both, but is not included in 
  452.     the distribution kernels.
  453.  
  454.     The speaker drivers are also included in FreeBSD.
  455.  
  456.